import { http } from '@/utils/request'

// 添加错题记录[x]
export function addErrorQuestion(data: { questionId: number | string; answers: any }) {
  return http.request({
    url: `/small/examRecord/addErrorQuestion`,
    method: 'POST',
    data
  })
}

// 考试记录(模拟,综合,专题)[x]
export function selectMyExamRecordList(params: { pageNumber: number; pageSize: number }) {
  return http.request({
    url: `/small/examRecord/selectMyExamList`,
    method: 'GET',
    params
  })
}

// 我的试题错题列表[x]
export function selectErrorQuestion() {
  return http.request({
    url: `/small/examRecord/selectErrorQuestion`,
    method: 'GET'
  })
}

// 错题记录[x]
export function selectErrorQuestionList(params: { pageNumber: number; pageSize: number }) {
  return http.request({
    url: `/small/examRecord/selectErrorQuestionList`,
    method: 'GET',
    params
  })
}

// 删除错题记录[x]
export function deleteErrorQuestion(questionId: number | string) {
  return http.request({
    url: `/small/examRecord/deleteErrorQuestion?questionId=${questionId}`,
    method: 'DELETE'
  })
}
